var Browser = new Object();
Browser.isMozilla = (typeof document.implementation != "undefined") && (typeof document.implementation.createDocument != "undefined") && (typeof HTMLDocument != "undefined");
Browser.isIE = window.ActiveXObject ? true: false;
Browser.isFirefox = (navigator.userAgent.toLowerCase().indexOf("firefox") != -1);
Browser.isSafari = (navigator.userAgent.toLowerCase().indexOf("safari") != -1);
Browser.isOpera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
var Utils = new Object();
Utils.htmlEncode = function(a) {
	return a.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
};
Utils.trim = function(a) {
	if (typeof(a) == "string") {
		return a.replace(/^\s*|\s*$/g, "")
	} else {
		return a
	}
};
Utils.isEmpty = function(a) {
	switch (typeof(a)) {
	case "string":
		return Utils.trim(a).length == 0 ? true: false;
		break;
	case "number":
		return a == 0;
		break;
	case "object":
		return a == null;
		break;
	case "array":
		return a.length == 0;
		break;
	default:
		return true
	}
};
Utils.isNumber = function(b) {
	var a = /^[\d|\.|,]+$/;
	return a.test(b)
};
Utils.isInt = function(b) {
	if (b == "") {
		return false
	}
	var a = /\D+/;
	return ! a.test(b)
};
Utils.isEmail = function(a) {
	var b = /([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)/;
	return b.test(a)
};
Utils.isTel = function(a) {
	var b = /^[\d|\-|\s|\_]+$/;
	return b.test(a)
};
Utils.fixEvent = function(b) {
	var a = (typeof b == "undefined") ? window.event: b;
	return a
};
Utils.srcElement = function(a) {
	if (typeof a == "undefined") {
		a = window.event
	}
	var b = document.all ? a.srcElement: a.target;
	return b
};
Utils.isTime = function(b) {
	var a = /^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}$/;
	return a.test(b)
};
Utils.x = function(a) {
	return Browser.isIE ? event.x + document.documentElement.scrollLeft - 2 : a.pageX
};
Utils.y = function(a) {
	return Browser.isIE ? event.y + document.documentElement.scrollTop - 2 : a.pageY
};
Utils.request = function(a, b) {
	var c = a.match(new RegExp("[?&]" + b + "=([^&]*)(&?)", "i"));
	return c ? c[1] : c
};
Utils.$ = function(a) {
	return document.getElementById(a)
};
function rowindex(a) {
	if (Browser.isIE) {
		return a.rowIndex
	} else {
		table = a.parentNode.parentNode;
		for (i = 0; i < table.rows.length; i++) {
			if (table.rows[i] == a) {
				return i
			}
		}
	}
}
document.getCookie = function(d) {
	var b = document.cookie.split("; ");
	for (var c = 0; c < b.length; c++) {
		var a = b[c].split("=");
		if (d == a[0]) {
			return decodeURIComponent(a[1])
		}
	}
	return null
};
document.setCookie = function(b, d, c) {
	var a = b + "=" + encodeURIComponent(d);
	if (c != null) {
		a += "; expires=" + c
	}
	document.cookie = a
};
document.removeCookie = function(a, b) {
	document.cookie = a + "=; expires=Fri, 31 Dec 1999 23:59:59 GMT;"
};
function getPosition(c) {
	var b = c.offsetTop;
	var a = c.offsetLeft;
	while (c = c.offsetParent) {
		b += c.offsetTop;
		a += c.offsetLeft
	}
	var d = {
		top: b,
		left: a
	};
	return d
}
function cleanWhitespace(b) {
	var b = b;
	for (var a = 0; a < b.childNodes.length; a++) {
		var c = b.childNodes[a];
		if (c.nodeType == 3 && !/\S/.test(c.nodeValue)) {
			b.removeChild(c)
		}
	}
};